package com.type;

import java.io.DataInputStream;
import java.io.IOException;
import java.util.ArrayList;

public class Commenter extends Follower {
	ArrayList<Comment> commentList = new ArrayList<Comment>();
	
	public Commenter() {
		super();
	}
	
	@Override
	public long getPhoneNumber() {
		return super.getPhoneNumber();
	}

	public ArrayList<Comment> getCommentList() {
		return commentList;
	}

	public void receive(DataInputStream dis) throws IOException, InterruptedException {
		super.receive(dis);
		int commentCount = dis.readInt();
		if(commentCount > 0) {
			for(int i=0; i< commentCount; i++) {
				Comment comment = new Comment();
				comment.receive(dis);
				commentList.add(comment);
			}
		}
	}
}
